<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div th:inline="text">
        <span >[[${name}]]</span>
        <input type="button" value="哈哈" onclick="fun()">
    </div>
</body>
<script th:inline="javascript">
    function fun() {
alert("哈哈哈哈哈")
    }
</script>
</html>